# -*- coding: utf-8 -*-
import openpyxl

wb = openpyxl.Workbook()
sheet = wb.get_active_sheet()

def write_str_arr(workbookname, data_arr):
    row = 1
    for str_arr in data_arr:
        i = 1
        column = ['A', 'B', 'C', 'D', 'E', 'F', 'J', 'H', 'I', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X' ,'Y', 'Z']
        for string in str_arr:
            column_index = ''
            if i % 26 > 0:
                m = int(i / 26)
                if m >= 1:
                    column_index  = column[m - 1] * m + column[i - 1]
                else:
                    column_index = column[i - 1]

            i += 1
            sheet[column_index + str(row)] = string
        row += 1

    wb.save(workbookname)
    wb.close()
# write_str_arr('test.xlsx', [["a", "v", "k"],["b", "o", "d"],["y", "e", "k"]])
